<template>
  <div>
    <!-- 头部 --state-->
    <div class="nav">
      <p v-show="state==1">
        <span>.</span>
        招聘审核
      </p>
      <p v-show="state==2">
        <span>.</span>
        招聘详情
      </p>

      <div id="nav_go4">
        <el-button type="info" icon="el-icon-back" class="btn_fanhui" @click="revert(5,2)">返回</el-button>
      </div>
    </div>
    <!-- 头部 --end-->

    <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// -->

    <!-- 审核||详情 --state-->
    <div id="table_box4">
      <table width="100%">
        <thead>
          <tr>
            <th colspan="6" v-show="state==1">招聘审核</th>
            <th colspan="6" v-show="state==2">招聘详情</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>招聘部门</td>
            <td>
              <el-input v-model="department" readonly></el-input>
            </td>
            <td>姓名</td>
            <td>
              <el-input v-model="name" readonly></el-input>
            </td>
            <td>职位</td>
            <td>
              <el-input v-model="position" readonly></el-input>
            </td>
          </tr>
          <tr>
            <td>招聘人数</td>
            <td>
              <el-input v-model="amount" readonly></el-input>
            </td>
            <td>性别要求</td>
            <td>
              <el-input v-model="sex" readonly></el-input>
            </td>
            <td>年龄要求</td>
            <td>
              <el-input v-model="age" readonly></el-input>
            </td>
          </tr>
          <tr>
            <td>工作经验</td>
            <td>
              <el-input v-model="experience" readonly></el-input>
            </td>
            <td>婚育要求</td>
            <td>
              <el-input v-model="marriage" readonly></el-input>
            </td>
            <td>教育水平</td>
            <td>
              <el-input v-model="education" readonly></el-input>
            </td>
          </tr>
          <tr>
            <td>岗位职责</td>
            <td colspan="5">
              <el-input type="textarea" :rows="8" placeholder v-model="duty" readonly></el-input>
            </td>
          </tr>
          <tr>
            <td>岗位要求</td>
            <td colspan="5">
              <el-input type="textarea" :rows="8" placeholder v-model="requirement" readonly></el-input>
            </td>
          </tr>
        </tbody>
      </table>
      <!-- 表格 --end-->

      <!-- 底部 --start-->
      <!-- <div class="bottom" v-if="state==1">
        <el-button type="primary" size="medium" @click="pass(1)">通过</el-button>
        <el-button type="info" size="medium" @click="pass(2)">驳回</el-button>
      </div>-->
      <div class="bottom">
        <el-button type="primary" size="medium" @click="revert(5,2)">确认</el-button>
        <el-button type="info" size="medium" @click="revert(5,2)">返回</el-button>
      </div>
      <!-- 底部 --end-->
    </div>
    <!-- 审核||详情 --state-->
  </div>
</template>
<script>
import axios from "axios";
export default {
  data() {
    return {
      state: "",
      e: "",
      department: "", //招聘部门
      name: "", //姓名
      position: "", //职位
      amount: "", //招聘人数
      sex: "", //性别
      age: "", //年龄
      experience: "", //工作经验
      marriage: "", //婚育要求
      education: "", //教育水平
      duty: "", //岗位职责
      requirement: "" //岗位要求
    };
  },
  created() {
    this.state = this.$route.query.state;
    this.e = this.$route.query.e;
    this.getval();
  },
  methods: {
    //详情数据
    getval() {
      let arr = { recruitno: this.e };
      let arr1 = JSON.stringify(arr);
      axios(
        "apis/PersonnelManagement.asmx/Recruitmentlst?index=2&jsondata=" + arr1
      ).then(({ data }) => {
        let data1 = this.$x2js.xml2js(data);
        let data3 = JSON.parse(data1.string.__text);
        console.log(data3);
        this.department = data3.applydepart;
        this.name = data3.applyer;
        this.position = data3.position;
        this.amount = data3.number;
        this.sex = data3.sex;
        this.age = data3.age;
        this.experience = data3.workexper;
        this.marriage = data3.marriage;
        this.education = data3.education;
        this.duty = data3.responsibilities;
        this.requirement = data3.requirement;
      });
    },
    //返回
    revert(index, index2) {
      this.$router.push({
        path: "/RecruitmentmanagementList",
        query: { index: index, index2: index2 }
      });
    }
  }
};
</script>
<style lang="scss" scoped>
@import "@/assets/scss/base.scss";
.nav {
  //border: solid 1px red;
  height: 60px;
  padding: 0 1%;
  position: relative;
  p {
    height: 40px;
    margin: 10px 0;
    line-height: 40px;
    span {
      background: $Header_color;
      color: $Header_color;
    }
  }
  #nav_go4 {
    position: absolute;
    top: 10px;
    right: 1%;
    img {
      height: 16px;
      padding-right: 10px;
    }
  }
}
#table_box4 {
  width: 98%;
  height: 670px;
  margin: 0 10%;
  background: $white;
  color: #909399;
  margin: 0 auto;
  border-radius: 10px;
  table tr td {
    height: 60px;
    width: 16.6%;
    padding: 0 2%;
    text-align: center;
    font-size: 14px;
    border: 1px solid #ebeef5;
    position: relative;
  }
  table tr th {
    height: 60px;
    text-align: center;
  }
  .bottom {
    text-align: center;
    margin-top: 10px;
  }
}
</style>
<style>
#table_box4 .el-textarea__inner {
  border: none;
  outline: none;
}
#table_box4 .el-select {
  width: 100%;
}
</style>